package com.tsmti.basicdata.entity;

import com.tsmti.core.common.entity.BaseDataEntity;
import org.hibernate.annotations.DynamicInsert;
import org.hibernate.annotations.DynamicUpdate;
import org.hibernate.annotations.Where;

import javax.persistence.*;

/**
 * path：com.tsmti.apply.entity
 *
 * @author: ft
 * time: 2018/7/3 10:44
 * Description:
 */
@Entity
@Table(name = "PIMS_WARDINFORMATION", catalog = "")
@DynamicInsert
@DynamicUpdate
@Where(clause = "delFlag = 0")
public class WardInformation extends BaseDataEntity<Long> {
    private static final long serialVersionUID = 1998082889527568981L;

    /**
     * ID
     */
    private Long id;
    /**
     * 编号
     */
    private String code;
    /**
     * 名称
     */
    private String name;
    /**
     * 上级ID
     */
    private Long parentId;
    /**
     * 级别
     */
    private Integer levels;
    /**
     * 排序号
     */
    private Integer sorts;
    /**
     * 是否启用
     */
    private Integer enable;
    /**
     * 类型   1病区 2手术室
     */
    private Integer type;

    @Id
    @Column(name = "ID")
    @GeneratedValue(strategy = GenerationType.SEQUENCE, generator = "SEQ_PIMS_WARDINFORMATION")
    @SequenceGenerator(name = "SEQ_PIMS_WARDINFORMATION", sequenceName = "WARDINFORMATION_SEQUENCE", allocationSize = 1)
    @Override
    public Long getId() {
        return id;
    }

    @Override
    public void setId(Long id) {
        this.id = id;
    }

    public String getCode() {
        return code;
    }

    public void setCode(String code) {
        this.code = code;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public Long getParentId() {
        return parentId;
    }

    public void setParentId(Long parentId) {
        this.parentId = parentId;
    }

    public Integer getLevels() {
        return levels;
    }

    public void setLevels(Integer levels) {
        this.levels = levels;
    }

    public Integer getSorts() {
        return sorts;
    }

    public void setSorts(Integer sorts) {
        this.sorts = sorts;
    }

    public Integer getEnable() {
        return enable;
    }

    public void setEnable(Integer enable) {
        this.enable = enable;
    }

    public Integer getType() {
        return type;
    }

    public void setType(Integer type) {
        this.type = type;
    }
}
